import request from '@/utils/request'

// 查询角色列表
export function listRole() {
    return request({
        url: '/permCenter/role/getRole',
        method: 'get',
    })
}

//新建角色
export function addRole(data) {
    return request({
        url: '/permCenter/role/createRole',
        method: 'post',
        data
    })
}

// 角色删除
export function delRole(id) {
    return request({
        url: '/permCenter/role/delRole?id=' + id,
        method: 'delete',
    })
}

// 角色编辑
export function editRole(data) {
    return request({
        url: '/permCenter/role/updateRole',
        method: 'put',
        data,
    })
}




// 查询用户列表
export function listUser(data) {
    return request({
        url: '/back/users/multiQueryPaged',
        method: 'post',
        data
    })
}

//新建用户
export function addUser(data) {
    return request({
        url: '/back/users/add',
        method: 'post',
        data
    })
}

// 用户删除
export function delUser(id) {
    return request({
        url: '/back/users/delete?id=' + id,
        method: 'post',
        data:{id:id}
    })
}

// 用户编辑
export function editUser(data) {
    return request({
        url: '/back/users/update',
        method: 'post',
        data,
    })
}